package com.ym.pms.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ym.pms.model.SysAuth;
import com.ym.pms.model.SysRole;
import com.ym.pms.model.SysUser;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author a1353
 */
@Repository
public interface SysUserDao extends BaseMapper<SysUser> {

    /**
     * 根据用户ID查询角色
     *
     * @param userId 用户ID
     * @return 角色列表
     */
    List<SysRole> findRoleByUserId(Long userId);

    /**
     * 根据用户ID查询权限
     *
     * @param userId 用户ID
     * @return
     */
    List<SysAuth> findAuthByUserId(Long userId);
}